﻿using System;
using System.Collections.Generic;
using System.Data;
using RemoteTestRunner.Contracts;

namespace RemoteTestRunner.BusinessLogic.Views
{
    //IWin32Window,
    //System.ComponentModel.ISynchronizeInvoke,
    public interface ITestRunnerView : IViewBase
    {
        DataRowView Test { get; set; }
        DataRowView Project { get; set; }
        TestResultSummary TestResultSummary { get; set; }
        List<TestResultSummary> SelectedTestResults { get; set; }
        string TestFile { get; set; }

        void DisplayInvalidResultsFileMessage();

        void SetTestInfo(TestInfo info);
        //void SetTestResult(TestResult result);
        void SetDataSources(List<DataSourceInfo> sources);

        void SetProjects(List<Project> projects);
        //void SetTests(DataView tests);
        void SetTestResultHistory(IList<TestResultSummary> results);
        void SetTestClassAndMethods(IList<TestClass> classesAndMethods);
        List<String> GetTestsToRun();
        void Show();
        void DisplayTestResults(TestResult result);

        bool CanDeleteSelectedResults();

        // Callback methods
        void SubscribeLoadTestFileRequested(EventHandler listener);
        void SubscribeTestResultSelected(EventHandler listener);
        void SubscribeRunTest(EventHandler listener);
        void SubscribeEmailTestResults(EventHandler listener);

        void SubscribeProjectSelected(EventHandler listener);
        void SubscribeTestSelected(EventHandler listener);
        void SubscribeTestsFiltered(EventHandler<GenericEventArgs<bool>> listener);

        void SubscribeDeleteTestResults(EventHandler listener);
        void SubscribeClosed(EventHandler listener);
        //void SubscribeReloadProjects(EventHandler listener);
        //void SubscribeRtrServiceSettingsChanged(EventHandler listener);
        void SubscribeDataSourceSelected(EventHandler<GenericEventArgs<string>> listener);
        void SubscribeCopyTestResultsToClipBoard(EventHandler listener);

        void SubscribeLoadPreviousTestRuns(EventHandler listener);
    }
}
